class: center, middle, inverse, title-slide # Uso de R y Youtube para reporte de protocolos:
experiencia en laboratorio de física de suelos ### Cristina Contreras,
Sara Acevedo
, Maria Jesús Melej, Edouard Acuña, Carolina Giraldo, Carlos Ávila and Carlos Bonilla ### Pontificia Universidad Católica de Chile ### 10-12 de noviembre de 2021 --- <style type="text/css"> .remark-code{line-height: 1; font-size: 50%} @media print { .has-continuation { display: block; } } </style> --- class:inverse, middle, center # Sobre Soil Biophysics Lab <img style="border-radius: 50%;" src="data:image/png;base64,#https://static.wixstatic.com/media/a71414_85de21ba13024a48a60097ce851dae16~mv2.png" width="250px"/> *Laboratorio de Biofísica de Suelos* *PI: Dr. Carlos Bonilla* .fade[Pontificia Universidad Católica de Chile<br>Santiago, Chile] [<svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"></path></svg> biofisica.ing.puc.cl](https://biofisica.ing.puc.cl) [<svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"></path></svg> @soilbiophysics1](https://twitter.com/soilbiophysics1) [<svg viewBox="0 0 448 512" style="position:relative;display:inline-block;top:.1em;height:1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"></path></svg> @soilbiophysicslab](https://www.instagram.com/soilbiophysicslab) --- .pull-left[ ## Pandemia 1. Interacciones entre pares limitadas 2. Dificultades para los alumnos nuevos ] .pull-right.center[ <img src="data:image/png;base64,#img/student.jpeg" width="75%" style="display: block; margin: auto;" /> ] --- .pull-left[ ## Ideas 1. Crear repositorio de live coding 2. Compartir código entre pares ] .pull-right.center[ <img src="data:image/png;base64,#img/8401.jpg" width="75%" style="display: block; margin: auto;" /> <a style="padding-bottom:40px; font-size: 15px;" href="http://www.freepik.com">Designed by pch.vector / Freepik</a> ] --- .pull-left[ ### Triángulo de textura <img src="data:image/png;base64,#img/triangle.png" width="90%" style="display: block; margin: auto;" /> <a style="padding-bottom:40px; font-size: 15px;" href="http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0131299">Groenendyk et al., 2015</a> ] .pull-right.center[ ### Perfiles de suelo <img src="data:image/png;base64,#img/profiles.png" width="90%" style="display: block; margin: auto;" /> <a style="padding-bottom:40px; font-size: 15px;" href="http://ncss-tech.github.io/AQP/">NCSS, 2021</a> ] --- .pull-left[ ### Canal de youtube <iframe width="380" height="260" align="center" src="https://www.youtube.com/embed/ajixrDLwsVg" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> ] .pull-right.center[ ### Live Coding + paquete {flipbookr} <img src="data:image/png;base64,#img/flipbookr.gif" width="90%" style="display: block; margin: auto;" /> ] --- .pull-left[ ```r ggplot( data = datos_suelo_plot, aes( x=suelo, y=-espesor, fill=fct_reorder(horizontes,limite_inferior,.desc=TRUE)) # asegurar el orden de los horizontes )+ geom_col( width=0.2 ) + geom_text( aes(y=-(limite_superior + espesor/2),label=horizontes) # se centran las etiquetas ) + guides(fill=FALSE) + # sacamos la leyenda scale_fill_manual( # se definen los colores munsell breaks=datos_suelo_plot$horizontes, values=datos_suelo_plot$munsell_hex) + scale_y_continuous(labels = abs) + # profundidad con valores positivos labs( title = "Suelos muestreados", y = "Profundidad (cm)", x="" ) + geom_hline(yintercept = -45, color = "blue") + # agregamos una linea geom_text(aes(x = -Inf, y=-44, hjust = 0),label=" tabla de agua", color = "blue") + # describimos la linea theme_bw() ``` ] .pull-right[ <!-- --> ] --- count: false ###Paso a paso .panel1-plot-label-5-auto[ ```r *ggplot( * data = datos_suelo_plot, * aes( * x=suelo, * y=-espesor, * fill=fct_reorder(horizontes,limite_inferior,.desc=TRUE)) # asegurar el orden de los horizontes * ) ``` ] .panel2-plot-label-5-auto[ <!-- --> ] --- count: false ###Paso a paso .panel1-plot-label-5-auto[ ```r ggplot( data = datos_suelo_plot, aes( x=suelo, y=-espesor, fill=fct_reorder(horizontes,limite_inferior,.desc=TRUE)) # asegurar el orden de los horizontes )+ * geom_col( * width=0.2 * ) ``` ] .panel2-plot-label-5-auto[ <!-- --> ] --- count: false ###Paso a paso .panel1-plot-label-5-auto[ ```r ggplot( data = datos_suelo_plot, aes( x=suelo, y=-espesor, fill=fct_reorder(horizontes,limite_inferior,.desc=TRUE)) # asegurar el orden de los horizontes )+ geom_col( width=0.2 ) + * geom_text( * aes(y=-(limite_superior + espesor/2),label=horizontes) # se centran las etiquetas * ) ``` ] .panel2-plot-label-5-auto[ <!-- --> ] --- count: false ###Paso a paso .panel1-plot-label-5-auto[ ```r ggplot( data = datos_suelo_plot, aes( x=suelo, y=-espesor, fill=fct_reorder(horizontes,limite_inferior,.desc=TRUE)) # asegurar el orden de los horizontes )+ geom_col( width=0.2 ) + geom_text( aes(y=-(limite_superior + espesor/2),label=horizontes) # se centran las etiquetas ) + *guides(fill=FALSE) # sacamos la leyenda ``` ] .panel2-plot-label-5-auto[ <!-- --> ] --- count: false ###Paso a paso .panel1-plot-label-5-auto[ ```r ggplot( data = datos_suelo_plot, aes( x=suelo, y=-espesor, fill=fct_reorder(horizontes,limite_inferior,.desc=TRUE)) # asegurar el orden de los horizontes )+ geom_col( width=0.2 ) + geom_text( aes(y=-(limite_superior + espesor/2),label=horizontes) # se centran las etiquetas ) + guides(fill=FALSE) + # sacamos la leyenda *scale_fill_manual( # se definen los colores munsell * breaks=datos_suelo_plot$horizontes, * values=datos_suelo_plot$munsell_hex) ``` ] .panel2-plot-label-5-auto[ <!-- --> ] --- count: false ###Paso a paso .panel1-plot-label-5-auto[ ```r ggplot( data = datos_suelo_plot, aes( x=suelo, y=-espesor, fill=fct_reorder(horizontes,limite_inferior,.desc=TRUE)) # asegurar el orden de los horizontes )+ geom_col( width=0.2 ) + geom_text( aes(y=-(limite_superior + espesor/2),label=horizontes) # se centran las etiquetas ) + guides(fill=FALSE) + # sacamos la leyenda scale_fill_manual( # se definen los colores munsell breaks=datos_suelo_plot$horizontes, values=datos_suelo_plot$munsell_hex) + *scale_y_continuous(labels = abs) # profundidad con valores positivos ``` ] .panel2-plot-label-5-auto[ <!-- --> ] --- count: false ###Paso a paso .panel1-plot-label-5-auto[ ```r ggplot( data = datos_suelo_plot, aes( x=suelo, y=-espesor, fill=fct_reorder(horizontes,limite_inferior,.desc=TRUE)) # asegurar el orden de los horizontes )+ geom_col( width=0.2 ) + geom_text( aes(y=-(limite_superior + espesor/2),label=horizontes) # se centran las etiquetas ) + guides(fill=FALSE) + # sacamos la leyenda scale_fill_manual( # se definen los colores munsell breaks=datos_suelo_plot$horizontes, values=datos_suelo_plot$munsell_hex) + scale_y_continuous(labels = abs) + # profundidad con valores positivos *labs( *title = "Suelos muestreados", *y = "Profundidad (cm)", *x="" * ) ``` ] .panel2-plot-label-5-auto[ <!-- --> ] --- count: false ###Paso a paso .panel1-plot-label-5-auto[ ```r ggplot( data = datos_suelo_plot, aes( x=suelo, y=-espesor, fill=fct_reorder(horizontes,limite_inferior,.desc=TRUE)) # asegurar el orden de los horizontes )+ geom_col( width=0.2 ) + geom_text( aes(y=-(limite_superior + espesor/2),label=horizontes) # se centran las etiquetas ) + guides(fill=FALSE) + # sacamos la leyenda scale_fill_manual( # se definen los colores munsell breaks=datos_suelo_plot$horizontes, values=datos_suelo_plot$munsell_hex) + scale_y_continuous(labels = abs) + # profundidad con valores positivos labs( title = "Suelos muestreados", y = "Profundidad (cm)", x="" ) + *geom_hline(yintercept = -45, color = "blue") # agregamos una linea ``` ] .panel2-plot-label-5-auto[ <!-- --> ] --- count: false ###Paso a paso .panel1-plot-label-5-auto[ ```r ggplot( data = datos_suelo_plot, aes( x=suelo, y=-espesor, fill=fct_reorder(horizontes,limite_inferior,.desc=TRUE)) # asegurar el orden de los horizontes )+ geom_col( width=0.2 ) + geom_text( aes(y=-(limite_superior + espesor/2),label=horizontes) # se centran las etiquetas ) + guides(fill=FALSE) + # sacamos la leyenda scale_fill_manual( # se definen los colores munsell breaks=datos_suelo_plot$horizontes, values=datos_suelo_plot$munsell_hex) + scale_y_continuous(labels = abs) + # profundidad con valores positivos labs( title = "Suelos muestreados", y = "Profundidad (cm)", x="" ) + geom_hline(yintercept = -45, color = "blue") + # agregamos una linea *geom_text(aes(x = -Inf, y=-44, hjust = 0),label=" tabla de agua", color = "blue") # describimos la linea ``` ] .panel2-plot-label-5-auto[ <!-- --> ] --- count: false ###Paso a paso .panel1-plot-label-5-auto[ ```r ggplot( data = datos_suelo_plot, aes( x=suelo, y=-espesor, fill=fct_reorder(horizontes,limite_inferior,.desc=TRUE)) # asegurar el orden de los horizontes )+ geom_col( width=0.2 ) + geom_text( aes(y=-(limite_superior + espesor/2),label=horizontes) # se centran las etiquetas ) + guides(fill=FALSE) + # sacamos la leyenda scale_fill_manual( # se definen los colores munsell breaks=datos_suelo_plot$horizontes, values=datos_suelo_plot$munsell_hex) + scale_y_continuous(labels = abs) + # profundidad con valores positivos labs( title = "Suelos muestreados", y = "Profundidad (cm)", x="" ) + geom_hline(yintercept = -45, color = "blue") + # agregamos una linea geom_text(aes(x = -Inf, y=-44, hjust = 0),label=" tabla de agua", color = "blue") + # describimos la linea *theme_bw() ``` ] .panel2-plot-label-5-auto[ <!-- --> ] --- count: false ###Paso a paso .panel1-plot-label-5-auto[ ```r ggplot( data = datos_suelo_plot, aes( x=suelo, y=-espesor, fill=fct_reorder(horizontes,limite_inferior,.desc=TRUE)) # asegurar el orden de los horizontes )+ geom_col( width=0.2 ) + geom_text( aes(y=-(limite_superior + espesor/2),label=horizontes) # se centran las etiquetas ) + guides(fill=FALSE) + # sacamos la leyenda scale_fill_manual( # se definen los colores munsell breaks=datos_suelo_plot$horizontes, values=datos_suelo_plot$munsell_hex) + scale_y_continuous(labels = abs) + # profundidad con valores positivos labs( title = "Suelos muestreados", y = "Profundidad (cm)", x="" ) + geom_hline(yintercept = -45, color = "blue") + # agregamos una linea geom_text(aes(x = -Inf, y=-44, hjust = 0),label=" tabla de agua", color = "blue") + # describimos la linea theme_bw() ``` ] .panel2-plot-label-5-auto[ <!-- --> ] <style> .panel1-plot-label-5-auto { color: black; width: 38.6060606060606%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel2-plot-label-5-auto { color: black; width: 59.3939393939394%; hight: 32%; float: left; padding-left: 1%; font-size: 80% } .panel3-plot-label-5-auto { color: black; width: NA%; hight: 33%; float: left; padding-left: 1%; font-size: 80% } </style> --- .pull-left[ ## Recepción 1. Mejor de lo esperado, incluso material de otros temas 2. Colaboración con [otros pares](https://bjnnowak.netlify.app/2021/07/26/r-plotting-soil-textures-example-of-water-storage-capacity/) ] .pull-right[ <img src="data:image/png;base64,#img/8401.jpg" width="75%" /> ] --- class: goodbye-slide, inverse, middle, right ### Dudas? Comentarios? Puedes contactarnos en: .left[ [<svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"></path></svg> biofisica.ing.puc.cl](https://biofisica.ing.puc.cl) [<svg viewBox="0 0 576 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"></path></svg> Laboratorio Biofísica de Suelos](https://www.youtube.com/channel/UCtpWXCy2NDEWpdeGLoyHmBg) [<svg viewBox="0 0 512 512" style="height:1em;position:relative;display:inline-block;top:.1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"></path></svg> @soilbiophysics1](https://twitter.com/soilbiophysics1) [<svg viewBox="0 0 448 512" style="position:relative;display:inline-block;top:.1em;height:1em;" xmlns="http://www.w3.org/2000/svg"> <path d="M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z"></path></svg> @soilbiophysicslab](https://www.instagram.com/soilbiophysicslab) ]